package tgc.edu.exam.repository;

import java.util.List;
import java.util.UUID;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.exam.custom.CommonRepository;
import tgc.edu.exam.entity.SysDept;

@Repository
public interface SysDeptRepository extends CommonRepository<SysDept, UUID> {

	public List<SysDept> findByParentIsNullOrderByIdx1();

	@Query(value="SELECT * FROM sys_dept WHERE parent_id=?1",nativeQuery=true)
	public List<SysDept> findByParent_id(UUID id);

}
